public class Calculator {

// Addition of two numbers
public static int add_2_num(int num1,int num2) 
{
return (num1+num2);
}

// Addition of two Double Numbers

public static double add_2_num(double num1,double num2)
{
return (num1+num2);
}


//Addition of Three Numbers

public static int add_3_num(int a,int b,int c)
{
return(a+b+c);
}

//Addition of Three Double Digit Number

public static double add_3_num(double a,double b,double c)
{
return(a+b+c);
}


// Finding and converting string to integer

public static int conversion(String a)
{
return(Integer.parseInt(a));
}

//Find given year is Leap Year Or Not

public static void isLeap(int year)
{
if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))

System.out.println("Leap Year = " + year);

}


//Check Wherther radius vlaue is positive or negative

public static boolean isradius(double radius)
{
if(radius>=0) {
double area = radius * radius * 3.142;
System.out.println("Area = " + area);
return true;
}
else
{
return false;
}
}

//Finding Given number is Even Or Odd

public static void isEven(int num)
{
System.out.println((num % 2 == 0) ? "number is even" : "number is odd ");
}

// Printing Even numbers Between 0 to 100

public static void printEven()
{
System.out.println("Even Numbers");
for(int i=0; i<100; i++)
{
if(i % 2 == 0)
System.out.println(i);
}
}
/*

//Printing Odd numbers between 1000 to 5000

public static void printOdd()
{
int i=1000;
System.out.println("Odd numbers");
while(i<5000)
{
if( i % 2 != 0 ) {
System.out.println(i);
}
i++;
}
*/



//Find the max of Two Double Numbers

public static double max(double a,double b)
{
return((a>b)? a : b);
}


//Find the fibonacci Series.

public static void fib(int num)
{
System.out.println("Fibonacci Series");

int f1,f2,f3;
f2=0;
f3=1;
for(int i=1; i<=num; i++) {
System.out.println(" " + f2 +  " " + f3);
f1=f2;
f2=f3;
f3=f1+f2;
}
}
/*

//Fing Given number is prime or Not

public static boolean isPrime(int num)
{
for(int i=2;i<num; i++)
{
if(num % 2 == 0) && (
return(true);
}

}
*/

public static void printall()
{
int i=0;
while(i<10)
{
System.out.println("I will Practice Program Every Day");
i++;
}
}


public static void main(String[] args)
{

System.out.println("Addition of two numbers ");

System.out.println(add_2_num(10,20));
System.out.println(add_2_num(10.11,20.20));
System.out.println(add_3_num(10,20,30));

System.out.println(add_3_num(10.1,20.2,30.3));

System.out.println(conversion("1"));

isLeap(2000);

boolean b=isradius(2.2);

System.out.println(" " + b);

isEven(20);

isEven(21);

printEven();


System.out.println(max(90,60));


fib(5);

printall();

}

}






